﻿pragma Singleton
import QtQuick 2.11
import QtMultimedia 5.9

import "_Global/Global.js" as GlobalJS

//import com.leamus.gamedata 1.0

QtObject {

    id: globalObj

    //分辨率
    property int resolution: {
        switch(Qt.platform.os) {
            case "android":
            case "ios":
                return 2;
            default:
                return 1;
        }
    }

    //设置
    property QtObject config: QtObject {

        property string strWindowTitle: qsTr("英语杀1.5.1")

        property bool fullScreen: {
            switch(Qt.platform.os) {
                case "android":
                case "ios":
                    return true;
                default:
                    if(GameManager.platform == "release")
                        return true;
                    else
                        return false;
            }
        }

        property bool bMusicOn: GameManager.gameConfig["EffectOn"] == "1" ? true : false
        property bool bEffectOn: GameManager.gameConfig["MusicOn"] == "1" ? true : false

        property int nQuestionChoiceDelay: GameManager.gameConfig["QuestionChoiceDelay"] //问题选择时间
        property int nQuestionShowDelay: GameManager.gameConfig["QuestionShowDelay"]     //问题展示时间
        property int nComQuestionChoiceDelay: GameManager.gameConfig["ComQuestionChoiceDelay"]

        property int nChuPaiDelay: GameManager.gameConfig["ChuPaiDelay"]
        property int nPaiDelayHide: 500        //牌移动后消失的延时
        property int nQiPaiPaiDelayHide: 3000        //弃牌延时

        property url urlBuyCard: {
            switch(Qt.platform.os) {
                case "android":
                case "ios":
                    return "https://www.yingyusha.com/wap/user/pay";
                default:
                    return "https://www.yingyusha.com/portal/buy.html";
            }
        }

        property url urlRegisterUser: {
            switch(Qt.platform.os) {
                case "android":
                case "ios":
                    return "https://www.yingyusha.com/wap/user/singup";
                default:
                    return "https://www.yingyusha.com/user/register/index.html";
            }
        }

        property url urlForgot: {
            switch(Qt.platform.os) {
                case "android":
                case "ios":
                    return "https://www.yingyusha.com/wap/user/findpassword";
                default:
                    return "https://www.yingyusha.com/user/login/findpassword.html";
            }
        }

    }

    //全局共享资源
    property QtObject resource: QtObject {
        //字体
        property QtObject fonts: QtObject {
            property FontLoader font1: FontLoader { //思源
                source: _FixLocalPath_R("Media/Fonts/Font1.ttf")
            }
            property string fontHeiTi: "黑体"
            property string fontWeiRuanYaHei: "微软雅黑"
        }
        //音效
        property QtObject effects: QtObject {
            property Audio effectClose: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/Close.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectButton: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/Button.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectPage: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/Page.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectLevelUp: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/LevelUp.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectLevelDown: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/LevelDown.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectWeapon: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/Weapon.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectHarm: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/Harm.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectCorrect: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/QuestionCorrect.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectMistake: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/QuestionMistake.wav")
                //loops: Audio.Infinite
                loops: 1
            }
            property Audio effectQuestion: Audio {
                source: _FixLocalPath_R("Media/Sounds/Effects/MyQuestion.wav")
                //loops: Audio.Infinite
                loops: 1
            }
        }

        //根据分辨率选择的图形资源
        property QtObject images: QtObject {

            property QtObject gameLogin: QtObject {
                property url main: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Login/Desktop/Main.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Login/Mobile/Main.png");
                    }
                }
                property url login: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Login/Desktop/Login.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Login/Mobile/Login.png");
                    }
                }
                property url reg: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Login/Desktop/Reg.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Login/Mobile/Reg.png");
                    }
                }
                property url forgotPass: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Login/Desktop/ForgotPass.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Login/Mobile/ForgotPass.png");
                    }
                }
                property url rememberPass: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Login/Desktop/RememberPass.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Login/Mobile/RememberPass.png");
                    }
                }
                property url close: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Login/Desktop/Close.png");
                        case 2:
                            return "";
                    }
                }
                property url min: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Login/Desktop/Min.png");
                        case 2:
                            return "";
                    }
                }
            }

            property QtObject gameRegGame: QtObject {
                property url back: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/RegGame/Desktop/Back.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/RegGame/Mobile/Back.png");
                    }
                }
            }

            property QtObject gameCenter: QtObject {
                property url back: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Center/Desktop/Back.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Center/Mobile/Back.png");
                    }
                }
            }

            property QtObject gameServer: QtObject {
                property url back: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/GameServers/Desktop/Back.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/GameServers/Mobile/Back.png");
                    }
                }
            }

            property QtObject gameClass: QtObject {
                property url red: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Class/Desktop/Red.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Class/Mobile/Red.png");
                    }
                }
                property url yellow: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Class/Desktop/Yellow.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Class/Mobile/Yellow.png");
                    }
                }
            }

            property QtObject gameGame: QtObject {
                property url hand: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Game/Desktop/Hand.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Game/Mobile/Hand.png");
                    }
                }
                property url choiceArea: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Game/Desktop/ChoiceArea.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Game/Mobile/ChoiceArea.png");
                    }
                }
                property url wordBack: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Game/Desktop/WordBack.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Game/Mobile/WordBack.png");
                    }
                }
                property url progress0: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Game/Progress-0.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Game/Progress-0.png");
                    }
                }
                property url progress1: {
                    switch(resolution) {
                        case 1:
                            return _FixResourcePath_R("Media/Images/Game/Progress-1.png");
                        case 2:
                            return _FixResourcePath_R("Media/Images/Game/Progress-1.png");
                    }
                }
            }
        }
    }

    //用户数据
    property QtObject userInfo: QtObject {
        property int userLevel: 0   //等级
        property string userLevelName: ""
    }

    //游戏数据
    property QtObject gameData: QtObject {
    }



    //坐标系统
    property QtObject gamePos: QtObject {
        //property point posWindow: Qt.point(1920,1080) //基像素
        property size sizeWindow: Qt.size(1920,1080) //基像素

        //对话框(通用的Media/Images/Class/ClassInfo/Back.png)
        property QtObject dialogMap: QtObject {
            property rect rectBack: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(0),
                                       globalObj.dpW(766),globalObj.dpH(541));
                    case 2:
                        return Qt.rect(globalObj.dpW(386),globalObj.dpH(134),
                                       globalObj.dpW(1148),globalObj.dpH(811));
                }
            }
            property rect rectClose: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(691),globalObj.dpH(14),
                                       globalObj.dpW(52),globalObj.dpH(52));
                    case 2:
                        return Qt.rect(globalObj.dpW(1040),globalObj.dpH(20),
                                       globalObj.dpW(77),globalObj.dpH(77));
                }
            }
            property rect rectTextMsg: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(97),globalObj.dpH(75),
                                       globalObj.dpW(560),globalObj.dpH(250));
                    case 2:
                        return Qt.rect(globalObj.dpW(140),globalObj.dpH(110),
                                       globalObj.dpW(850),globalObj.dpH(380));
                }
            }
            property int nTextMsgFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(26);
                    case 2:
                        return globalObj.dpH(32);
                }
            }

            property int nTitleY: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(20);
                    case 2:
                        return globalObj.dpH(42);
                }
            }
        }

        property int paiWidth: {
            switch(resolution) {
                case 1:
                    return globalObj.dpW(110);
                case 2:
                    return globalObj.dpW(174);
            }
        }
        property int paiHeight: {
            switch(resolution) {
                case 1:
                    return globalObj.dpH(164);
                case 2:
                    return globalObj.dpH(262);
            }
        }
/*
        property rect rectPaiQu: Qt.rect(globalObj.dpW(180)   //牌区
                                         ,globalObj.dpH(sizeWindow.height - 180)
                                         ,globalObj.dpW(sizeWindow.width) - mapPlayer.sizePlayerAvatar.width - rectZhuangBei.width
                                         ,globalObj.dpH(180)
                                     )*/


        property rect rectPaiQu: Qt.rect(0   //下方手牌区
                                         ,0
                                         ,globalObj.dpW(sizeWindow.width)
                                         ,globalObj.dpH(sizeWindow.height)
                                     )

        //玩家本人 手牌起始坐标
        property point posShouPai: {
            switch(resolution) {
                case 1:
                    return Qt.point(globalObj.dpW(265),globalObj.dpH(908));
                case 2:
                    return Qt.point(globalObj.dpW(390),globalObj.dpH(818));
            }
        }

        //下方手牌区的宽(容纳牌)
        property int nShouPaiQuWidth: rectPaiQu.width - posShouPai.x - mapPlayer.sizePlayerAvatar.width - paiWidth

        //玩家本人 画线的地方
        property point posPaiQu: {
            switch(resolution) {
                case 1:
                    return Qt.point(globalObj.dpW(960), globalObj.dpH(980));
                case 2:
                    return Qt.point(globalObj.dpW(1060), globalObj.dpH(980));
            }
        }

        //本人装备
        property rect rectMyZhuangBei: {
            switch(resolution) {
                case 1:
                    return Qt.rect(0, globalObj.dpH(900),globalObj.dpW(240),globalObj.dpH(180));
                case 2:
                    return Qt.rect(0, globalObj.dpH(810),globalObj.dpW(360),globalObj.dpH(270));
            }
        }

        //头像内的坐标
        property QtObject mapMyItems: QtObject {
            property rect rectJiNeng: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(850),globalObj.dpW(50),globalObj.dpH(50));
                    case 2:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(755),globalObj.dpW(60),globalObj.dpH(60));
                }
            }
            property int nJiNengDX: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpW(50);
                    case 2:
                        return globalObj.dpW(60);
                }
            }
        }

        //本人判定图标的坐标
        //判定(玩家本人)
        property rect rectMyPanDing: {
            switch(resolution) {
                case 1:
                    return Qt.rect(globalObj.dpW(240),globalObj.dpH(875),globalObj.dpW(27),globalObj.dpH(27));
                case 2:
                    return Qt.rect(globalObj.dpW(360),globalObj.dpH(775),globalObj.dpW(39),globalObj.dpH(39));
            }
        }
        //判定间距
        property int nMyPanDingSpacing:  {
            switch(resolution) {
                case 1:
                    return globalObj.dpW(27);
                case 2:
                    return globalObj.dpW(39);
            }
        }

        property int nChuPaiMsgFontSize: {
            switch(resolution) {
                case 1:
                    return globalObj.dpH(18);
                case 2:
                    return globalObj.dpH(25);
            }
        }



        //头像内的坐标
        property QtObject mapPlayer: QtObject {
            //玩家头像大小
            property size sizePlayerAvatar: {
                switch(resolution) {
                    case 1:
                        return Qt.size(globalObj.dpW(160),globalObj.dpH(180));
                    case 2:
                        return Qt.size(globalObj.dpW(240),globalObj.dpH(270));
                }
            }

            //装备(敌人)
            property rect rectZhuangBei: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(153),globalObj.dpW(87),globalObj.dpH(27));
                    case 2:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(230),globalObj.dpW(130),globalObj.dpH(39));
                }
            }

            //判定(敌人)
            property rect rectPanDing: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(86),globalObj.dpH(153),globalObj.dpW(27),globalObj.dpH(27));
                    case 2:
                        return Qt.rect(globalObj.dpW(130),globalObj.dpH(230),globalObj.dpW(39),globalObj.dpH(39));
                }
            }
            //判定间距
            property int nPanDingSpacing:  {
                switch(resolution) {
                    case 1:
                        return globalObj.dpW(26);
                    case 2:
                        return globalObj.dpW(39);
                }
            }

            //血量大小
            property size sizePlayerBlood: {
                switch(resolution) {
                    case 1:
                        return Qt.size(globalObj.dpW(21),globalObj.dpH(20));
                    case 2:
                        return Qt.size(globalObj.dpW(30),globalObj.dpH(29));
                }
            }

            //第1个血量图片坐标
            property point posPlayerBlood: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(137),globalObj.dpH(127));
                    case 2:
                        return Qt.point(globalObj.dpW(206),globalObj.dpH(190));
                }
            }
            //血量间距
            property int nPanDingYSpacing: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(20);
                    case 2:
                        return globalObj.dpH(30);
                }
            }

            //技能大小
            property size sizePlayerJiNeng: {
                switch(resolution) {
                    case 1:
                        return Qt.size(globalObj.dpW(31),globalObj.dpH(30));
                    case 2:
                        return Qt.size(globalObj.dpW(40),globalObj.dpH(39));
                }
            }

            //第1个血量图片坐标(弃用)
            property point posPlayerJiNeng: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(0),globalObj.dpH(147));
                    case 2:
                        return Qt.point(globalObj.dpW(0),globalObj.dpH(210));
                }
            }
            //血量间距
            property int nJiNengXSpacing: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(32);
                    case 2:
                        return globalObj.dpH(41);
                }
            }


            //牌数坐标
            property point posPlayerPokeCount: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(145),globalObj.dpH(160));
                    case 2:
                        return Qt.point(globalObj.dpW(220),globalObj.dpH(239));
                }
            }

            //字体大小
            property int nPlayerPokeCountFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(12);
                    case 2:
                        return globalObj.dpH(20);
                }
            }
        }

        property int shouPai_DX: paiWidth  //牌间距
        property int shouPai_DY: globalObj.dpH(15)        //点牌时

        //出牌信息
        property rect rectChuPaiMessage: {
            switch(resolution) {
                case 1:
                    return Qt.rect(globalObj.dpW(610),globalObj.dpH(814),globalObj.dpW(500),globalObj.dpH(20));
                case 2:
                    return Qt.rect(globalObj.dpW(700),globalObj.dpH(710),globalObj.dpW(510),globalObj.dpH(30));
            }
        }

        //出牌进度条
        property rect rectProgress: {
            switch(resolution) {
                case 1:
                    return Qt.rect(globalObj.dpW(685),globalObj.dpH(837),globalObj.dpW(350),globalObj.dpH(15));
                case 2:
                    return Qt.rect(globalObj.dpW(692),globalObj.dpH(738),globalObj.dpW(525),globalObj.dpH(23));
            }
        }

        //按钮
        property QtObject mapButtons: QtObject {
            property rect rectOK: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(685),globalObj.dpH(856),globalObj.dpW(120),globalObj.dpH(36));
                    case 2:
                        return Qt.rect(globalObj.dpW(700),globalObj.dpH(760),globalObj.dpW(180),globalObj.dpH(54));
                }
            }
            property rect rectCancel: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(915),globalObj.dpH(856),globalObj.dpW(120),globalObj.dpH(36))
                    case 2:
                        return Qt.rect(globalObj.dpW(1030),globalObj.dpH(760),globalObj.dpW(180),globalObj.dpH(54))
                }
            }
            property rect rectGiveup: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(1102),globalObj.dpH(856),globalObj.dpW(96),globalObj.dpH(36));
                    case 2:
                        return Qt.rect(globalObj.dpW(1300),globalObj.dpH(760),globalObj.dpW(144),globalObj.dpH(54));
                }
            }
        }

        //信息框
        property rect rectMsgBox:  {
            switch(resolution) {
                case 1:
                    return Qt.rect(globalObj.dpW(1720),globalObj.dpH(0),globalObj.dpW(200),globalObj.dpH(900));
                case 2:
                    return Qt.rect(globalObj.dpW(1720),globalObj.dpH(0),globalObj.dpW(0),globalObj.dpH(0));
            }
        }

        //牌提示
        property size sizePokeTips: {

            switch(resolution) {
                case 1:
                    return Qt.size(globalObj.dpW(200),globalObj.dpH(100))
                case 2:
                    return Qt.size(globalObj.dpW(300),globalObj.dpH(100))
            }
        }

        property int nPokeTipsFontSize: {
            switch(resolution) {
                case 1:
                    return Global.dpH(16)
                case 2:
                    return Global.dpH(30)
            }
        }



        //玩家坐标
        property list<QtObject> listPosPlayer: [

            //玩家0(本人)
            QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(1760),globalObj.dpH(900));
                        case 2:
                            return Qt.point(globalObj.dpW(1680),globalObj.dpH(810));
                    }
                }
            }
            , QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(1548),globalObj.dpH(390));
                        case 2:
                            return Qt.point(globalObj.dpW(1608),globalObj.dpH(360));
                    }
                }
            }// Qt.point((gamePos.sizeWindow.width - gamePos.rectMsgBox.width - gamePos.mapPlayer.sizePlayerAvatar.width / 2 - 50) / 5 * 4 + 50,gamePos.sizeWindow.height - 468 )}
            , QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(1548),globalObj.dpH(30));
                        case 2:
                            return Qt.point(globalObj.dpW(1608),globalObj.dpH(0));
                    }
                }
            }//Qt.point((gamePos.sizeWindow.width - gamePos.rectMsgBox.width - gamePos.mapPlayer.sizePlayerAvatar.width / 2 - 50) / 5 * 4 + 50,60 )}
            , QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(1164),globalObj.dpH(30));
                        case 2:
                            return Qt.point(globalObj.dpW(1224),globalObj.dpH(0));
                    }
                }
            }//  Qt.point(globalObj.dpW(780),globalObj.dpH(30) )}

            , QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(780),globalObj.dpH(30));
                        case 2:
                            return Qt.point(globalObj.dpW(840),globalObj.dpH(0));
                    }
                }
            }

            , QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(396),globalObj.dpH(30));
                        case 2:
                            return Qt.point(globalObj.dpW(456),globalObj.dpH(0));
                    }
                }
            }//  Qt.point((gamePos.sizeWindow.width - gamePos.rectMsgBox.width - gamePos.mapPlayer.sizePlayerAvatar.width / 2 - 50) / 5 + 50, 60 )}
            , QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(12),globalObj.dpH(30));
                        case 2:
                            return Qt.point(globalObj.dpW(72),globalObj.dpH(0));
                    }
                }
            }//  Qt.point(globalObj.dpW(780),globalObj.dpH(30) )}
            , QtObject {
                property point pos: {
                    switch(resolution) {
                        case 1:
                            return Qt.point(globalObj.dpW(12),globalObj.dpH(390));
                        case 2:
                            return Qt.point(globalObj.dpW(72),globalObj.dpH(360));
                    }
                }
            }//  Qt.point(50,gamePos.sizeWindow.height - 468 )}
        ]

        /*
        property point posPlayer0: Qt.point(globalObj.dpW(1760),globalObj.dpH(900))
        property point posPlayer1: Qt.point((sizeWindow.width - rectMsgBox.width - mapPlayer.sizePlayerAvatar.width / 2 - 50) / 5 * 4 + 50,sizeWindow.height - 468)
        property point posPlayer2: Qt.point((sizeWindow.width - rectMsgBox.width - mapPlayer.sizePlayerAvatar.width / 2 - 50) / 5 * 4 + 50,60)
        property point posPlayer3: Qt.point(globalObj.dpW(780),globalObj.dpH(30))
        property point posPlayer4: Qt.point(globalObj.dpW(780),globalObj.dpH(30))
        property point posPlayer5: Qt.point((sizeWindow.width - rectMsgBox.width - mapPlayer.sizePlayerAvatar.width / 2 - 50) / 5 + 50, 60)
        property point posPlayer6: Qt.point(globalObj.dpW(780),globalObj.dpH(30))
        property point posPlayer7: Qt.point(50,sizeWindow.height - 468)
        */

        //牌堆,弃牌堆
        property point posPaiDui: Qt.point(globalObj.dpW(sizeWindow.width / 2 - 300)
                                           ,globalObj.dpH(sizeWindow.height / 2 - 80))
        property point posQiPaiDui:  {
            switch(resolution) {
                case 1:
                    return Qt.point(globalObj.dpW(865),globalObj.dpH(440));
                case 2:
                    return Qt.point(globalObj.dpW(960),globalObj.dpH(390));
            }
        }

        //property rect rectMsgBox : Qt.rect(sizeWindow.width - 450,50,250,sizeWindow.height - 170)


        //问题 坐标
        property QtObject mapQuestionBox: QtObject {
            //单词窗口
            property rect rectBox: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(705),globalObj.dpH(340),globalObj.dpW(310),globalObj.dpH(340));
                    case 2:
                        return Qt.rect(globalObj.dpW(705),globalObj.dpH(150),globalObj.dpW(490),globalObj.dpH(536));
                }
            }

            //倒计时
            property rect rectProgress: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(5),globalObj.dpH(335),globalObj.dpW(300),globalObj.dpH(12)); //进度条坐标
                    case 2:
                        return Qt.rect(globalObj.dpW(12),globalObj.dpH(524),globalObj.dpW(460),globalObj.dpH(20)); //进度条坐标
                }
            }

            //英文单词
            property rect rectWord: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(15),globalObj.dpH(30),globalObj.dpW(280),globalObj.dpH(50));
                    case 2:
                        return Qt.rect(globalObj.dpW(23),globalObj.dpH(15),globalObj.dpW(444),globalObj.dpH(90));
                }
            }

            //4个答案框坐标
            property list<QtObject> pointAnswer: [
                QtObject {
                    property int x: {
                        switch(resolution) {
                            case 1:
                                return globalObj.dpW(14);
                            case 2:
                                return globalObj.dpW(23);
                        }
                    }
                    property int y: {
                        switch(resolution) {
                            case 1:
                                return globalObj.dpH(106);
                            case 2:
                                return globalObj.dpH(115);
                        }
                    }
                },
                QtObject {
                    property int x: {
                            switch(resolution) {
                                case 1:
                                    return globalObj.dpW(14);
                                case 2:
                                    return globalObj.dpW(23);
                            }
                        }
                    property int y: {
                            switch(resolution) {
                                case 1:
                                    return globalObj.dpH(161);
                                case 2:
                                    return globalObj.dpH(215);
                            }
                        }
                },
                QtObject {
                    property int x: {
                                switch(resolution) {
                                    case 1:
                                        return globalObj.dpW(14);
                                    case 2:
                                        return globalObj.dpW(23);
                                }
                            }
                    property int y: {
                                switch(resolution) {
                                    case 1:
                                        return globalObj.dpH(216);
                                    case 2:
                                        return globalObj.dpH(315);
                                }
                            }
                },
                QtObject {
                    property int x: {
                                switch(resolution) {
                                    case 1:
                                        return globalObj.dpW(14);
                                    case 2:
                                        return globalObj.dpW(23);
                                }
                            }
                    property int y: {
                                switch(resolution) {
                                    case 1:
                                        return globalObj.dpH(271);
                                    case 2:
                                        return globalObj.dpH(415);
                                }
                            }
                }

            ]

            //4个答案框大小
            property size sizeAnswer: {
                switch(resolution) {
                    case 1:
                        return Qt.size(globalObj.dpW(282), globalObj.dpH(49));
                    case 2:
                        return Qt.size(globalObj.dpW(444), globalObj.dpH(90));
                }
            }
            //property point okButtonPos : Qt.point(50,260) //问题的 OK 坐标
            //property point unkownButtonPos : Qt.point(140,260) //进度条坐标
            //property rect textGeometry : Qt.rect(10,30,240,100) //问题的 单词 坐标
            //property var explainPos : [Qt.point(50,100), //问题的解释坐标(4个)
            //                            Qt.point(50,150),Qt.point(50,200),Qt.point(50,250)]

            property int nFontWord: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(20)
                    case 2:
                        return globalObj.dpH(30)
                }
            }
            property int nFontAnswer: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(15)
                    case 2:
                        return globalObj.dpH(27)
                }
            }
        }

        //选择区(手牌,判定和武器)
        property QtObject mapChoiceAreas: QtObject {
            //整个选择区域大小
            property rect rectChoiceAreas: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(599),globalObj.dpH(330),globalObj.dpW(520),globalObj.dpH(400));
                    case 2:
                        return Qt.rect(globalObj.dpW(570),globalObj.dpH(120),globalObj.dpW(778),globalObj.dpH(598));
                }
            }
            //第1行的第1张牌坐标
            property point posChoiceAreas1: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(20),globalObj.dpH(26));
                    case 2:
                        return Qt.point(globalObj.dpW(25),globalObj.dpH(30));
                }
            }
            //第2行的第1张牌坐标
            property point posChoiceAreas2: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(20),globalObj.dpH(207));
                    case 2:
                        return Qt.point(globalObj.dpW(25),globalObj.dpH(300));
                }
            }
            //间距
            property int nChoiceAreasPokeSpacing: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpW(123);
                    case 2:
                        return globalObj.dpW(184);
                }
            }
        }




        //游戏结束坐标
        property QtObject mapGameOver: QtObject {
            property rect rectGameOver: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(478),globalObj.dpH(214),globalObj.dpW(965),globalObj.dpH(652));
                    case 2:
                        return Qt.rect(globalObj.dpW(487),globalObj.dpH(162),globalObj.dpW(965),globalObj.dpH(652));
                }
            }
            property rect rectContinue: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(170),globalObj.dpH(470),globalObj.dpW(246),globalObj.dpH(97));
                    case 2:
                        return Qt.rect(globalObj.dpW(180),globalObj.dpH(475),globalObj.dpW(246),globalObj.dpH(97));
                }
            }
            property rect rectExit: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(545),globalObj.dpH(470),globalObj.dpW(246),globalObj.dpH(97));
                    case 2:
                        return Qt.rect(globalObj.dpW(560),globalObj.dpH(475),globalObj.dpW(246),globalObj.dpH(97));
                }
            }





            property rect rectTextCorrect: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(310),globalObj.dpW(150),globalObj.dpH(25));
                    case 2:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(310),globalObj.dpW(150),globalObj.dpH(25));
                        //return Qt.rect(globalObj.dpW(536),globalObj.dpH(265),globalObj.dpW(100),globalObj.dpH(30));
                }
            }
            property rect rectTextMistake: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(250),globalObj.dpW(150),globalObj.dpH(25));
                    case 2:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(250),globalObj.dpW(150),globalObj.dpH(25));
                        //return Qt.rect(globalObj.dpW(336),globalObj.dpH(265),globalObj.dpW(100),globalObj.dpH(30));
                }
            }
            property rect rectTextTotal: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(190),globalObj.dpW(150),globalObj.dpH(25));
                    case 2:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(190),globalObj.dpW(150),globalObj.dpH(25));
                        //return Qt.rect(globalObj.dpW(198),globalObj.dpH(265),globalObj.dpW(100),globalObj.dpH(30));
                }
            }
            property rect rectTextScore: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(370),globalObj.dpW(150),globalObj.dpH(25));
                    case 2:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(370),globalObj.dpW(150),globalObj.dpH(25));
                        //return Qt.rect(globalObj.dpW(706),globalObj.dpH(265),globalObj.dpW(100),globalObj.dpH(30));
                }
            }

            property rect rectFastChoice: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(190),globalObj.dpW(150),globalObj.dpH(25));
                    case 2:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(190),globalObj.dpW(150),globalObj.dpH(25));
                        //return Qt.rect(globalObj.dpW(706),globalObj.dpH(265),globalObj.dpW(100),globalObj.dpH(30));
                }
            }
            property rect rectContinualScore: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(250),globalObj.dpW(150),globalObj.dpH(25));
                    case 2:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(250),globalObj.dpW(150),globalObj.dpH(25));
                        //return Qt.rect(globalObj.dpW(706),globalObj.dpH(265),globalObj.dpW(100),globalObj.dpH(30));
                }
            }
            property rect rectSuccessScore: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(310),globalObj.dpW(150),globalObj.dpH(25));
                    case 2:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(310),globalObj.dpW(150),globalObj.dpH(25));
                        //return Qt.rect(globalObj.dpW(706),globalObj.dpH(265),globalObj.dpW(100),globalObj.dpH(30));
                }
            }
            property rect rectTextTotalScore: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(370),globalObj.dpW(150),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(660),globalObj.dpH(370),globalObj.dpW(150),globalObj.dpH(20));
                        //return Qt.rect(globalObj.dpW(250),globalObj.dpH(402),globalObj.dpW(100),globalObj.dpH(30));
                }
            }
        }

        //游戏结束时等级变化窗口
        property rect rectLevelBox: Qt.rect(globalObj.dpW(0),globalObj.dpH(0)
                                            ,globalObj.dpW(1920),globalObj.dpH(1080))


        //房间坐标
        property QtObject mapInGroup: QtObject {
            property rect rectMsgBox: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(1720),globalObj.dpH(0),globalObj.dpW(200),globalObj.dpH(1080));
                    case 2:
                        return Qt.rect(globalObj.dpW(1720),globalObj.dpH(0),globalObj.dpW(200),globalObj.dpH(1080));
                }
            }
        }

        //设置坐标
        property QtObject mapGameConfig: QtObject {
            property rect rectBack: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(687),globalObj.dpH(234),globalObj.dpW(546),globalObj.dpH(613));
                    case 2:
                        return Qt.rect(globalObj.dpW(610),globalObj.dpH(146),globalObj.dpW(700),globalObj.dpH(786));
                }
            }
            property rect rectClose: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(483),globalObj.dpH(8),globalObj.dpW(50),globalObj.dpH(50));
                    case 2:
                        return Qt.rect(globalObj.dpW(607),globalObj.dpH(10),globalObj.dpW(77),globalObj.dpH(77));
                }
            }
            property rect rectMusic: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(40),globalObj.dpH(200),globalObj.dpW(206),globalObj.dpH(93));
                    case 2:
                        return Qt.rect(globalObj.dpW(60),globalObj.dpH(268),globalObj.dpW(250),globalObj.dpH(112));
                }
            }
            property rect rectEffect:  {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(200),globalObj.dpW(206),globalObj.dpH(93));
                    case 2:
                        return Qt.rect(globalObj.dpW(390),globalObj.dpH(268),globalObj.dpW(250),globalObj.dpH(112));
                }
            }
            property rect rectExit:  {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(184),globalObj.dpH(414),globalObj.dpW(180),globalObj.dpH(64));
                    case 2:
                        return Qt.rect(globalObj.dpW(215),globalObj.dpH(510),globalObj.dpW(270),globalObj.dpH(96));
                }
            }
            property rect rectSpeed:  {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(40),globalObj.dpH(300),globalObj.dpW(100),globalObj.dpH(93));
                    case 2:
                        return Qt.rect(globalObj.dpW(60),globalObj.dpH(400),globalObj.dpW(120),globalObj.dpH(112));
                }
            }
        }


        property QtObject mapGameSchool: QtObject {
            property rect rectAvatar: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(0),
                                       globalObj.dpW(324),globalObj.dpH(154));
                    case 2:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(0),
                                       globalObj.dpW(485),globalObj.dpH(230));
                }
            }
            property rect rectAvatarName: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(156),globalObj.dpH(20),
                                       globalObj.dpW(146),globalObj.dpH(30));
                    case 2:
                        return Qt.rect(globalObj.dpW(237),globalObj.dpH(28),
                                       globalObj.dpW(211),globalObj.dpH(47));
                }
            }
            property rect rectAvatarScore: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(156),globalObj.dpH(56),
                                       globalObj.dpW(146),globalObj.dpH(18));
                    case 2:
                        return Qt.rect(globalObj.dpW(237),globalObj.dpH(85),
                                       globalObj.dpW(210),globalObj.dpH(24));
                }
            }
            property int nAvatarNameFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(13);
                    case 2:
                        return globalObj.dpH(19);
                }
            }
            property int nAvatarScoreFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(11);
                    case 2:
                        return globalObj.dpH(17);
                }
            }
            property rect rectRanking: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(250),globalObj.dpH(320),
                                       globalObj.dpW(320),globalObj.dpH(240));
                    case 2:
                        return Qt.rect(globalObj.dpW(240),globalObj.dpH(280),
                                       globalObj.dpW(400),globalObj.dpH(300));
                }
            }
            property rect rectStudy: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(730),globalObj.dpH(452),
                                       globalObj.dpW(540),globalObj.dpH(380));
                    case 2:
                        return Qt.rect(globalObj.dpW(655),globalObj.dpH(345),
                                       globalObj.dpW(700),globalObj.dpH(493));
                }
            }
            property rect rectSports: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(1320),globalObj.dpH(432),
                                       globalObj.dpW(480),globalObj.dpH(136));
                    case 2:
                        return Qt.rect(globalObj.dpW(1300),globalObj.dpH(380),
                                       globalObj.dpW(500),globalObj.dpH(205));
                }
            }
            property rect rectUserLevel: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(142),globalObj.dpH(82),
                                       globalObj.dpW(174),globalObj.dpH(60));
                    case 2:
                        return Qt.rect(globalObj.dpW(214),globalObj.dpH(122),
                                       globalObj.dpW(260),globalObj.dpH(90));
                }
            }
        }
        property QtObject mapGameUserInfo: QtObject {
            property rect rectBack: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(0),
                                       globalObj.dpW(673),globalObj.dpH(501));
                    case 2:
                        return Qt.rect(globalObj.dpW(510),globalObj.dpH(206),
                                       globalObj.dpW(900),globalObj.dpH(668));
                }
            }

            property rect rectUserName: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(120),
                                       globalObj.dpW(340),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(148),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }

            property rect rectSex: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(150),
                                       globalObj.dpW(340),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(190),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }
            property rect rectServer: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(180),
                                       globalObj.dpW(340),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(232),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }
            property rect rectGameUserName: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(210),
                                       globalObj.dpW(340),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(274),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }
            property rect rectUserLevel: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(240),
                                       globalObj.dpW(340),globalObj.dpH(330));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(316),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }
            property rect rectTotalScore: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(270),
                                       globalObj.dpW(340),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(358),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }
            property rect rectScoreYesterday: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(300),
                                       globalObj.dpW(340),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(400),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }
            property rect rectScoreWeek: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(360),globalObj.dpH(330),
                                       globalObj.dpW(340),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(470),globalObj.dpH(442),
                                       globalObj.dpW(290),globalObj.dpH(30));
                }
            }
            property rect rectClose: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(600),globalObj.dpH(10),
                                       globalObj.dpW(52),globalObj.dpH(52));
                    case 2:
                        return Qt.rect(globalObj.dpW(814),globalObj.dpH(14),
                                       globalObj.dpW(60),globalObj.dpH(60));
                }
            }

            property int nFontSize1: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(13);
                    case 2:
                        return globalObj.dpH(22);
                }

            }
            property int nFontSize2: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(13);
                    case 2:
                        return globalObj.dpH(22);
                }
            }
        }

        property QtObject mapClass: QtObject {
            property rect rectTitle: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(756),globalObj.dpH(42),
                                       globalObj.dpW(400),globalObj.dpH(100));
                    case 2:
                        return Qt.rect(globalObj.dpW(706),globalObj.dpH(40),
                                       globalObj.dpW(500),globalObj.dpH(125));
                }
            }
            property rect rectLeft: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(100),globalObj.dpH(473),
                                       globalObj.dpW(134),globalObj.dpH(134));
                    case 2:
                        return Qt.rect(globalObj.dpW(70),globalObj.dpH(460),
                                       globalObj.dpW(150),globalObj.dpH(150));
                }
            }
            property rect rectRight: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(1686),globalObj.dpH(473),
                                       globalObj.dpW(134),globalObj.dpH(134));
                    case 2:
                        return Qt.rect(globalObj.dpW(1700),globalObj.dpH(460),
                                       globalObj.dpW(150),globalObj.dpH(150));
                }
            }
            property rect rectReturn: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(875),globalObj.dpH(915),
                                       globalObj.dpW(156),globalObj.dpH(122));
                    case 2:
                        return Qt.rect(globalObj.dpW(840),globalObj.dpH(895),
                                       globalObj.dpW(235),globalObj.dpH(182));
                }
            }


            property size sizeRemind: {
                switch(resolution) {
                    case 1:
                        return Qt.size(globalObj.dpW(25),globalObj.dpH(25));
                    case 2:
                        return Qt.size(globalObj.dpW(40),globalObj.dpH(40));
                }
            }

            property size sizeLevelRect: {  //Level块大小
                switch(resolution) {
                    case 1:
                        return Qt.size(globalObj.dpW(120),globalObj.dpH(90));
                    case 2:
                        return Qt.size(globalObj.dpW(180),globalObj.dpH(135));
                }
            }
            property rect rectExcursion: {  //偏移,分别是起始x,y,偏移width,height
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(415),globalObj.dpH(195),
                                       globalObj.dpW(240),globalObj.dpH(200));
                    case 2:
                        return Qt.rect(globalObj.dpW(312),globalObj.dpH(214),
                                       globalObj.dpW(279),globalObj.dpH(173));
                }
            }
            property int nLevelFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(40);
                    case 2:
                        return globalObj.dpH(50);
                }

            }
        }


        property QtObject mapClassInfo: QtObject {
            property rect rectStudy: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(93),globalObj.dpH(385),
                                       globalObj.dpW(180),globalObj.dpH(64));
                    case 2:
                        return Qt.rect(globalObj.dpW(140),globalObj.dpH(590),
                                       globalObj.dpW(270),globalObj.dpH(96));
                }
            }

            property rect rectRestart: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(287),globalObj.dpH(385),
                                       globalObj.dpW(180),globalObj.dpH(64));
                    case 2:
                        return Qt.rect(globalObj.dpW(432),globalObj.dpH(590),
                                       globalObj.dpW(270),globalObj.dpH(96));
                }
            }

            property rect rectStudyCard: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(481),globalObj.dpH(385),
                                       globalObj.dpW(180),globalObj.dpH(64));
                    case 2:
                        return Qt.rect(globalObj.dpW(724),globalObj.dpH(590),
                                       globalObj.dpW(270),globalObj.dpH(96));
                }
            }

        }


        property QtObject mapGameStudyType: QtObject {
            property rect rectButtonRead: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(330),globalObj.dpH(480),
                                       globalObj.dpW(300),globalObj.dpH(100));
                    case 2:
                        return Qt.rect(globalObj.dpW(330),globalObj.dpH(465),
                                       globalObj.dpW(450),globalObj.dpH(150));
                }
            }
            property rect rectButtonWrite: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(1290),globalObj.dpH(480),
                                       globalObj.dpW(300),globalObj.dpH(100));
                    case 2:
                        return Qt.rect(globalObj.dpW(1170),globalObj.dpH(465),
                                       globalObj.dpW(450),globalObj.dpH(150));
                }
            }
            property rect rectReturn: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(875),globalObj.dpH(915),
                                       globalObj.dpW(156),globalObj.dpH(122));
                    case 2:
                        return Qt.rect(globalObj.dpW(840),globalObj.dpH(895),
                                       globalObj.dpW(235),globalObj.dpH(182));
                }
            }
        }

        property QtObject mapChoiceServer: QtObject {
            property rect rectServer1: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(810),globalObj.dpH(410),
                                       globalObj.dpW(300),globalObj.dpH(100));
                    case 2:
                        return Qt.rect(globalObj.dpW(330),globalObj.dpH(465),
                                       globalObj.dpW(450),globalObj.dpH(150));
                }
            }
            property rect rectServer2: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(810),globalObj.dpH(560),
                                       globalObj.dpW(300),globalObj.dpH(100));
                    case 2:
                        return Qt.rect(globalObj.dpW(1170),globalObj.dpH(465),
                                       globalObj.dpW(450),globalObj.dpH(150));
                }
            }
        }


        property QtObject mapGameGrade: QtObject {
            property size sizeButton: {
                switch(resolution) {
                    case 1:
                        return Qt.size(globalObj.dpW(300),globalObj.dpH(100));
                    case 2:
                        return Qt.size(globalObj.dpW(450),globalObj.dpH(150));
                }
            }
            property point pointButton1: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(540),globalObj.dpH(380));
                    case 2:
                        return Qt.point(globalObj.dpW(375),globalObj.dpH(340));
                }
            }
            property point pointButton2: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(1060),globalObj.dpH(380));
                    case 2:
                        return Qt.point(globalObj.dpW(1099),globalObj.dpH(340));
                }
            }
            property point pointButton3: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(540),globalObj.dpH(610));
                    case 2:
                        return Qt.point(globalObj.dpW(375),globalObj.dpH(612));
                }
            }
            property point pointButton4: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(1060),globalObj.dpH(610));
                    case 2:
                        return Qt.point(globalObj.dpW(1099),globalObj.dpH(612));
                }
            }
            property point pointButton5: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(510),globalObj.dpH(270));
                    case 2:
                        return Qt.point(globalObj.dpW(375),globalObj.dpH(340));
                }
            }
            property point pointButton6: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(1110),globalObj.dpH(270));
                    case 2:
                        return Qt.point(globalObj.dpW(1099),globalObj.dpH(340));
                }
            }
            property point pointButton7: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(510),globalObj.dpH(490));
                    case 2:
                        return Qt.point(globalObj.dpW(375),globalObj.dpH(612));
                }
            }
            property point pointButton8: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(1110),globalObj.dpH(490));
                    case 2:
                        return Qt.point(globalObj.dpW(1099),globalObj.dpH(612));
                }
            }
            property point pointButton9: {
                switch(resolution) {
                    case 1:
                        return Qt.point(globalObj.dpW(810),globalObj.dpH(695));
                    case 2:
                        return Qt.point(globalObj.dpW(728),globalObj.dpH(70));
                }
            }

            property rect rectReturn: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(875),globalObj.dpH(915),
                                       globalObj.dpW(156),globalObj.dpH(122));
                    case 2:
                        return Qt.rect(globalObj.dpW(840),globalObj.dpH(895),
                                       globalObj.dpW(235),globalObj.dpH(182));
                }
            }
        }


        property QtObject mapLogin: QtObject {
            property rect rectBack: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(0),globalObj.dpH(0),
                                       globalObj.dpW(674),globalObj.dpH(394));
                    case 2:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(106),
                                       globalObj.dpW(1320),globalObj.dpH(760));
                }
            }
            property rect rectTextUser: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(151),globalObj.dpH(117),
                                       globalObj.dpW(372),globalObj.dpH(43));
                    case 2:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(228),
                                       globalObj.dpW(744),globalObj.dpH(86));
                }
            }
            property rect rectTextPass: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(151),globalObj.dpH(177),
                                       globalObj.dpW(372),globalObj.dpH(43));
                    case 2:
                        return Qt.rect(globalObj.dpW(300),globalObj.dpH(348),
                                       globalObj.dpW(744),globalObj.dpH(86));
                }
            }
            property rect rectLogin: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(214),globalObj.dpH(280),
                                       globalObj.dpW(250),globalObj.dpH(68));
                    case 2:
                        return Qt.rect(globalObj.dpW(400),globalObj.dpH(520),
                                       globalObj.dpW(515),globalObj.dpH(150));
                }
            }
            property int nFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(22);
                    case 2:
                        return globalObj.dpH(40);
                }
            }
            property rect rectForgot: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(445),globalObj.dpH(230),
                                       globalObj.dpW(64),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(880),globalObj.dpH(450),
                                       globalObj.dpW(130),globalObj.dpH(34));
                }
            }
            property rect rectReg: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(165),globalObj.dpH(230),
                                       globalObj.dpW(64),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(320),globalObj.dpH(450),
                                       globalObj.dpW(130),globalObj.dpH(34));
                }
            }
            property rect rectRememberPass: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(315),globalObj.dpH(230),
                                       globalObj.dpW(64),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(604),globalObj.dpH(450),
                                       globalObj.dpW(130),globalObj.dpH(34));
                }
            }
            property rect rectRememberPassRect: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(289),globalObj.dpH(232),
                                       globalObj.dpW(16),globalObj.dpH(16));
                    case 2:
                        return Qt.rect(globalObj.dpW(565),globalObj.dpH(450),
                                       globalObj.dpW(34),globalObj.dpH(34));
                }
            }
            property rect rectMessage: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(280),globalObj.dpH(255),
                                       globalObj.dpW(112),globalObj.dpH(20));
                    case 2:
                        return Qt.rect(globalObj.dpW(462),globalObj.dpH(490),
                                       globalObj.dpW(400),globalObj.dpH(34));
                }
            }
            property int nMessageFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(12);
                    case 2:
                        return globalObj.dpH(24);
                }
            }
        }

        property QtObject mapRegGameUser: QtObject {
            property rect rectName: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(845),globalObj.dpH(585),
                                       globalObj.dpW(220),globalObj.dpH(50));
                    case 2:
                        return Qt.rect(globalObj.dpW(798),globalObj.dpH(608),
                                       globalObj.dpW(318),globalObj.dpH(72));
                }
            }
            property rect rectStart: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(835),globalObj.dpH(670),
                                       globalObj.dpW(240),globalObj.dpH(87));
                    case 2:
                        return Qt.rect(globalObj.dpW(780),globalObj.dpH(750),
                                       globalObj.dpW(360),globalObj.dpH(130));
                }
            }
            property rect rectBoy: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(700),globalObj.dpH(360),
                                       globalObj.dpW(160),globalObj.dpH(180));
                    case 2:
                        return Qt.rect(globalObj.dpW(574),globalObj.dpH(267),
                                       globalObj.dpW(240),globalObj.dpH(270));
                }
            }
            property rect rectGirl: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(1060),globalObj.dpH(360),
                                       globalObj.dpW(160),globalObj.dpH(180));
                    case 2:
                        return Qt.rect(globalObj.dpW(1114),globalObj.dpH(267),
                                       globalObj.dpW(240),globalObj.dpH(270));
                }
            }
            property rect rectTextMsg: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(864),globalObj.dpH(644),
                                       globalObj.dpW(183),globalObj.dpH(14));
                    case 2:
                        return Qt.rect(globalObj.dpW(710),globalObj.dpH(695),
                                       globalObj.dpW(500),globalObj.dpH(30));
                }
            }

            property int nNameFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(20);
                    case 2:
                        return globalObj.dpH(30);
                }
            }

            property int nMsgFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(15);
                    case 2:
                        return globalObj.dpH(20);
                }
            }
        }

        property QtObject mapGameEscMenu: QtObject {
            property rect rectBack: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(559),globalObj.dpH(270),
                                       globalObj.dpW(766),globalObj.dpH(541));
                    case 2:
                        return Qt.rect(globalObj.dpW(478),globalObj.dpH(214),
                                       globalObj.dpW(965),globalObj.dpH(652));
                }
            }
            property rect rectMsg: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(97),globalObj.dpH(75),
                                       globalObj.dpW(560),globalObj.dpH(250));
                    case 2:
                        return Qt.rect(globalObj.dpW(125),globalObj.dpH(90),
                                       globalObj.dpW(700),globalObj.dpH(300));
                }
            }
            property rect rectContinueButton: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(93),globalObj.dpH(385),
                                       globalObj.dpW(180),globalObj.dpH(64));
                    case 2:
                        return Qt.rect(globalObj.dpW(120),globalObj.dpH(460),
                                       globalObj.dpW(246),globalObj.dpH(97));
                }
            }
            property rect rectExitButton: {
                switch(resolution) {
                    case 1:
                        return Qt.rect(globalObj.dpW(481),globalObj.dpH(385),
                                       globalObj.dpW(180),globalObj.dpH(64));
                    case 2:
                        return Qt.rect(globalObj.dpW(580),globalObj.dpH(460),
                                       globalObj.dpW(246),globalObj.dpH(97));
                }
            }
            //字体大小
            property int nMsgFontSize: {
                switch(resolution) {
                    case 1:
                        return globalObj.dpH(26);
                    case 2:
                        return globalObj.dpH(32);
                }
            }
        }
        //property int questionBox_X : (sizeWindow.width - rectMsgBox.width - questionBox.width) / 2
        //property int choiceAreas_X : (sizeWindow.width - rectMsgBox.width - popupChoiceAreas.width) / 2
        /*
        property point posQuestionProgress : Qt.point(10,240)
        property point posQuestionOK : Qt.point(50,260)
        property var posQuestionExplain : [Qt.point(50,100),Qt.point(50,150),Qt.point(50,200),Qt.point(50,250)]
        property rect posQuestionText: Qt.rect(10,10,240,100)
    */
    }



//自适应系统方法1:
    //property real multiplierX: 1 //default multiplier, but can be changed by user
    //property real multiplierY: 1 //default multiplier, but can be changed by user
    //这两个在game的Component.onCompleted中修改
    property real multiplierW: 1 //default multiplier, but can be changed by user
    property real multiplierH: 1 //default multiplier, but can be changed by user
    //function dpX(numbers) {
    //    return Math.round(numbers * multiplierX);
    //}
    //function dpY(numbers) {
    //    return Math.round(numbers * multiplierY);
    //}
    function dpW(numbers) {
        return Math.round(numbers * multiplierW);
    }
    function dpH(numbers) {
        return Math.round(numbers * multiplierH);
    }
    /*在Window中添加:
    onWidthChanged: {
        multiplierW = root.width / maxSize.width;

    }
    onHeightChanged: {
        multiplierH = root.height / maxSize.height;
    }*/



//自适应系统方法2:
    /*
    //Item中添加:
    transform: [
        Scale {
            origin {

            }
            xScale:
                root.width / maxSize.width
            yScale:
                root.height / maxSize.height
        }

    ]
    */




//其他方法:
    /*
    //界面size
    property real pixelDensity: 4.46
    property real multiplierH: height/600 //default multiplier, but can be changed by user
    property real multiplierW: width/1024 //default multiplier, but can be changed by user

    function dpH(numbers) {

        return Math.round(numbers*((pixelDensity*25.4)/160)*multiplierH);
    }
    function dpW(numbers) {

        return Math.round(numbers*((pixelDensity*25.4)/160)*multiplierW);
    }
*/




    function _FixLocalPath_R(path) {  //只读文件路径转换
        switch(Qt.platform.os) {
        case "android":
            //console.debug("assets:/" + path)
            return "assets:/" + path;    //也可以是qrc:/ 或 相对绝对路径
        case "windows":
            //console.debug("file:" + path)
            return "file:" + path;       //也可以是qrc:/ 或 相对绝对路径     //也可以是qrc:/ 或 相对绝对路径
        case "osx":     //苹果的比较特殊!!!
            return "file:" + GameManager.sl_ApplicationPath() + "/" + path;       //也可以是qrc:/ 或 相对绝对路径
        case "ios":     //苹果的比较特殊!!!
            return "file:" + GameManager.sl_ApplicationPath() + "/" + path;       //也可以是qrc:/ 或 相对绝对路径
        default:
            //console.debug("qrc:/" + path)
            return "qrc:/" + path;       //也可以是qrc:/ 或 相对绝对路径
        }
        return Qt.resolvedUrl(path);    //转换为绝对路径
    }
    function _FixLocalPath_W(path) {  //读写文件路径转换
        switch(Qt.platform.os) {
        case "android":
            //console.debug(path)
            //return path;                 //也可以是 相对绝对路径
            return "file:" + path;       //也可以是 相对绝对路径
        case "windows":
            //console.debug("file:" + path)
            return "file:" + path;       //也可以是 相对绝对路径
        case "osx":     //苹果的比较特殊!!!
            return "file:" + GameManager.sl_ApplicationPath() + "/" + path;       //也可以是qrc:/ 或 相对绝对路径
        case "ios":     //苹果的比较特殊!!!
            return "file:" + GameManager.sl_ApplicationPath() + "/" + path;       //也可以是qrc:/ 或 相对绝对路径
        default:
            //console.debug(path)
            return path;                 //也可以是 相对绝对路径
        }
        return Qt.resolvedUrl(path);    //转换为绝对路径
    }

    function _FixResourcePath_R(path) {  //只读资源路径转换
        return "qrc:/" + path;
    }


    Component.onCompleted: {
        console.log("Global.qml加载完毕")
    }
}
